import {post,del,fetch} from './http'

// 发布公告
export const informUpdate = function (data) {
    return new Promise((resolve, reject) => {
        fetch('/flower-server/inform/publish', data).then(res =>{
            resolve(res)
        }).catch(err => {
            reject(err)
        })
    })
}
// 批量删除
export const delInformBatch = function (data) {
    return new Promise((resolve, reject) => {
        del('/flower-server/inform/delete/list', data).then(res =>{
            resolve(res)
        }).catch(err => {
            reject(err)
        })
    })
}
// 获取
export const getAllinform = function (data) {
    return new Promise((resolve, reject) => {
        fetch('/flower-server/inform/all').then(res =>{
            resolve(res)
        }).catch(err => {
            reject(err)
        })
    })
}
// 删除
export const delInformById = function (data) {
    return new Promise((resolve, reject) => {
        del('/flower-server/inform/delete/'+ data).then(res =>{
            resolve(res)
        }).catch(err => {
            reject(err)
        })
    })
}
// 根据id
export const getlinformById = function (data) {
    return new Promise((resolve, reject) => {
        fetch('/flower-server/inform/'+ data, data).then(res =>{
            resolve(res)
        }).catch(err => {
            reject(err)
        })
    })
}